Lehmer–Schur algorithm